Skip to content

ci: the spawn-edge acceptance harness (tebako-runtime-ruby#211) - #126

Merged
ronaldtse merged 1 commit into
mainfrom
ci/spawn-edge-acceptance
Sep 30, 2026
Merged

ronaldtse merged 1 commit into
mainfrom
ci/spawn-edge-acceptance

Conversation

@ronaldtse

@ronaldtse ronaldtse commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

What

Adds a minimal spawn-edge acceptance harness under ci/spawn-edge/ — the fixture half of tamatebako/tebako-runtime-ruby#211. The runtime factory consumes it per ruby line × platform, after the boot smoke and before publish, so a driver spawn-plan regression (the argv[0]-drop class — #121, surfaced as tamatebako/tebako#691 and fixed in tebako v2.8.23) fails the leg instead of reaching a published runtime. No full metanorma compile involved: the whole gate is two tiny payloads and one boot.

How it works

  • fixtures/ — two payload trees:
    • provider (spawn-edge-provider 1.0.0): exposes one command, spawn-edge-echo, which prints its received ARGV.
    • consumer (spawn-edge-probe): declares a critical requires on the provider's exposed command, then array-spawns it twice — system("spawn-edge-echo", "alpha", "beta gamma", "--flag=x", out: capture) and IO.popen([...]) — asserting child exit 0 and the exact argv echo.
  • run.sh (POSIX: linux-gnu, macos, and musl-in-alpine) and run-msys.sh (windows; cygpath discipline, MSYS2_ARG_CONV_EXCL/MSYS2_ENV_CONV_EXCL='*', PE-named DLL staging) press both payloads with tfs mkimage in the default image format, stage a scratch store (runtime exe + env image + sha256 sidecars, provider payload + manifest mirror read back from the pressed image), and boot the leg's runtime exe against the consumer with the store on TEBAKO_HOME.
  • Verdict lines: SPAWN-EDGE-ACCEPTANCE-OK <ruby> (<triplet>) / FAIL spawn-edge (…); failures print the child's raw boot diagnostics, so the failing leg names the broken edge.

Inputs: RUNTIME_PKG_DIR (the leg's freshly built runtime package), RUBY_VERSION, TEBAKO_VERSION, TFS_CLI; optional SCRATCH. Nothing is installed outside the scratch store; re-runs are idempotent.

Evidence

Verified locally on macos-arm64 against published factory packages (tfs CLI 2.8.23, sha256-verified):

  • Pass oracle: v0.16.32 runtimes, ruby 4.0.7 and 3.3.12 → SPAWN-EDGE-ACCEPTANCE-OK, exit 0. (v0.16.32 passes because the factory's chain gate rolls this repo from main at build time — the argv[0] apply-side fix, b52aaf4, landed on main before that publish; the factory's pinned source release predates it.)
  • Negative oracle: v0.16.29 (pre-fix) ruby 4.0.7 → gate fails, exit 1, with exactly the bug signature — the child boot dies on --tebako-entry 'spawn-edge-echo': the env image declares no runtime entrypoint of that name — the parent's expose list outruns the runtime's spawn surface (the argv[0] drop shifts flag parsing and loses the provider mount). The harness catches the regression class it exists for.
  • Repo suite: bundle exec rspec — 116 examples, 0 failures. bash -n, ruby -c, and YAML parsing all clean.

Consumer

tamatebako/tebako-runtime-ruby#226 wires this into _build-platform.yml, riding the pre-existing harness_ref input (default main); until this lands on main, a probe dispatch with harness_ref: ci/spawn-edge-acceptance exercises the gate end-to-end.

A minimal per-line gate for the driver spawn-plan bug class — ruby#121's
argv[0] drop at plan apply, tebako#691's array-spawn of an exposed
payload command failing days after the line shipped. No factory gate
exercised "payload array-spawns a child through a spec-32
kind: executable edge"; the class surfaced only in a full metanorma
compile.

ci/spawn-edge presses two tiny fixture payloads (a consumer whose
manifest carries the expose: edge, a provider exposing a command that
echoes its argv), stages a scratch store with the runtime pair under
test + the provider payload (the manifest mirror read back from the
pressed image), and boots the consumer entry, which array-spawns the
exposed command as system() and IO.popen legs and asserts the child
received the exact argv. The scripts build nothing: the runtime arrives
as the factory leg's artifacts, the press/readback tool is the leg's
pin-verified tfs CLI.

Verified locally on macos-arm64 against the published packages: ruby
4.0.7 and 3.3.12 of tebako 0.16.32 report SPAWN-EDGE-ACCEPTANCE-OK; the
pre-fix 0.16.29 runtime fails the gate with the exact bug signature
(the child's flag parse shifted, its provider mount lost, the entry
resolving against the env image).
@ronaldtse
ronaldtse marked this pull request as ready for review September 30, 2026 07:26
@ronaldtse
ronaldtse merged commit d9db2d3 into main Sep 30, 2026
43 checks passed
@ronaldtse
ronaldtse deleted the ci/spawn-edge-acceptance branch September 30, 2026 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants